<template>
  <!-- 已放款和已归档 -->
  <div class="box  clearfix">
    <section class="section_one">
      <FunctionalAreas
        :released="released"
        :orderNumber="orderNumber"
      ></FunctionalAreas>
      <div class="title_sub prduct_bod_r">产品说明：</div>
      <ProductDescriptionToo></ProductDescriptionToo>
    </section>
    <section class="section_wrap">
      <div class="title_sub infro_bod_l">信息查看：</div>
      <div class="state-box">
        <div>
          <div class="state" v-if="stateInfo.orderStatus==4">状态：已放款</div>
          <div class="state" v-if="stateInfo.orderStatus==12">状态：已结清</div>
        </div>
      <div class="clearedTime" v-if="stateInfo.orderStatus==12">结清时间:{{stateInfo.clearedTime}}</div>
      </div>

      <InformationsViewer02 :orderNumber="orderNumber"></InformationsViewer02>
    </section>
    <!-- <section class="section_wrap">

     <div class="title_sub infdh_bod_l">
       贷后信息：
     </div>
     <PostLoan />
   </section> -->
    <section class="section_wrap">
      <div class="title_sub infro_bod_l">风控大数据查询</div>
      <viewInfo></viewInfo>
    </section>
    <section class="section_wrap " v-show="showFillAnIn">
      <div class="title_sub infro_bod_l">补登信息：</div>
      <FillAnInFormation
        :orderNumber="orderNumber"
        @showbox="toshow"
      ></FillAnInFormation>
    </section>
    <section class="section_wrap">
      <div class="title_sub infro_bod_l">审批信息：</div>
      <LoanInfor :orderNumber="orderNumber"></LoanInfor>
    </section>
    <section class="section_wrap">
      <div class="title_sub ingz_bod_l">提成规则：</div>
      <Commission :orderNumber="orderNumber"></Commission>
    </section>


    <section class="section_wrap">
      <div class="title_sub upload_bod_l">附件管理：</div>
      <!-- 上传组件 -->
      <Upload class="uploadStyle" :isNew="isNew"></Upload>
    </section>
    <section class="section_wrap">
      <Attachment></Attachment>
      <div class="title_sub prduct_bod_r">审批流：</div>
      <ApprovalText :orderNumber="orderNumber"></ApprovalText>
    </section>
  </div>
</template>

<script>
import FunctionalAreas from "../../components/business/FunctionalAreas";
import ProductDescriptionToo from "../../components/business/ProductDescriptionToo";
import InformationsViewer02 from "../../components/business/InformationsViewer02";
import ApprovalText from "../../components/business/ApprovalText";
import Attachment from "../../components/business/Attachment";
import Upload from "../../components/business/Upload";
import Commission from "../../components/business/Commission";
// import PostLoan from "../../components/meitList/PostLoan";
import LoanInfor from "@/components/business/LoanInforAjf";
import FillAnInFormation from "../../components/business/FillAnInFormation";
import viewInfo from "../../components/business/viweInfo.vue";
import { getProductUrl } from "../../assets/js/api";

export default {
  name: "Released",
  components: {
    FunctionalAreas,
    ProductDescriptionToo,
    InformationsViewer02,
    ApprovalText,
    Attachment,
    Upload,
    Commission,
    // PostLoan,
    LoanInfor,
    FillAnInFormation,
    viewInfo
  },
  data() {
    return {
      released: true,
      orderNumber: "",
      markUpdate: "",
      isNew: false,
      showFillAnIn: true,
      stateInfo: {}
    };
  },
  created() {
    this.orderNumber = sessionStorage.getItem("orderNumber");
    this.getState();
  },

  methods: {
    getState() {
      getProductUrl({
        orderNumber: this.orderNumber
      }).then(res => {
        this.stateInfo = res.data;
      });
    },
    toshow(msg) {
      this.showFillAnIn = msg;
    }
  }
};
</script>

<style scoped type="less">
.text {
  font-size: 20px;
  font-weight: bold;
  margin-top: 20px;
  text-align: left;
  text-indent: 2em;
}

.state {
  font-size: 22px;
  font-weight: bold;
  float: right;
  margin-top: -20px;
  /*margin-right: 3%;*/
}

.uploadStyle {
  position: relative;
  margin-top: 20px;
}

.commission {
  line-height: 70px;
  height: 70px;
}

.commissionText {
  font-size: 20px;
  font-weight: bold;
  float: left;
  margin-left: 3%;
}


</style>
